<h2><?= $this->escape($this->element->getAttrib('title')) ?></h2>
<p class="description"><?= $this->escape($this->element->getAttrib('description')) ?></p>

<?php
	$value = $this->element->getValue();
?>

<ol>
	<?php foreach($this->element->getAttrib('options') as $weight=>$text) { ?>
	<li><input type="checkbox" value="<?= $weight ?>" name="<?= $this->element->getName() ?>[<?= $weight ?>]" id="<?= $this->element->getName()."_".$weight ?>" <?= (isset($value[$weight]) && $value[$weight]) ? 'checked="checked"' : '' ?> /> <label for="<?= $this->element->getName()."_".$weight ?>"><?= $this->escape($text) ?></label></li>
	<?php } ?>

	<?php if ($this->element->getAttrib('label_other')): ?>
	<li><input type="checkbox" value="other" name="<?= $this->element->getName() ?>[other]" id="<?= $this->element->getName()."_other" ?>" <?= (isset($value['other']) && $value['other'] === 'other') ? 'checked="checked"' : '' ?>/> <label for="<?= $this->element->getName()."_other" ?>"><?= $this->escape($this->element->getAttrib('label_other')) ?></label><input type="text" value="<?= isset($value['uservalue']) ? $this->escape($value['uservalue']) : '' ?>" name="<?= $this->element->getName() ?>[uservalue]" /></li>
	<?php endif; ?>
</ol>
